<!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="utf-8">

    

    <!--icon-->
    
        <link rel="shortcut icon" type='image/x-icon' href="/favicon.ico">
    

    <!-- 渲染优化 -->
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="HandheldFriendly" content="True" >
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <!-- meta -->
    
    <title>最低一行代码，解锁网易云灰色歌曲 | 风风疯</title>
    
    
        <meta name="description" content="忙忙碌碌。">
    

    <!--Social link-->
     
        <meta name="twitter:card" content="summary_large_image " />
        
            <meta property="og:type" content="website" />
        
        <meta property="og:locale" content="en" />
        <meta property="og:site_name" content="风风疯>" />
        <meta property="og:title" content="最低一行代码，解锁网易云灰色歌曲 | 风风疯 " />
        <meta property="og:description" content="忙忙碌碌。 " />
        <meta property="og:image" content="" />
     

    <!-- feed -->
    

    
        
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-theme-cards@0.1/dist/css/style.min.css">

    
    

    <!--LaTex-->
    

     
        
            <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
         
     

    
         
    
         
    

<meta name="generator" content="Hexo 4.2.0"></head>

    <body>
        <div id="app">
            <header class="header">
    <div class="header__left">
        
            <a href="/" class="button">
                <span class="logo__text">
                    ← 风风疯 | 首页
                </span>
            </a>
        
    </div>
    <div class="header__right">
         
    </div>
</header>


            <main class="main">
    <div class="post-title">
    <h1 class="post-title__text">
        最低一行代码，解锁网易云灰色歌曲
    </h1>
    <div class="post-meta">
        
            <a href="/archives/2020/03/" class="button" style="color: #808080;">
    2020-03-09
</a>
        
        
            
    &nbsp;·&nbsp;<a href="/categories/%E6%95%99%E7%A8%8B/" class="button">教程</a>

 
        
        
     
        <span id="busuanzi_container_page_pv" hidden>
            <span>·</span>
            <span></span>
            <span id="busuanzi_value_page_pv"></span>
            <span>Views</span>
        </span>
     
 

  
    </div>
</div>
<div class="post content-box">
    <div class="post__header">
        
             
        
    </div>
    <div class="post__content">
        <div class="markdown-body">
            <p><img src="https://upload-images.jianshu.io/upload_images/20815774-294dbd617bc130a9?imageMogr2/auto-orient/strip" alt="image"><br>图片来源网络</p>
<h2 id="一、服务器搭建教程"><a href="#一、服务器搭建教程" class="headerlink" title="一、服务器搭建教程"></a>一、服务器搭建教程</h2><p>大神开源的<br>项目地址：<a href="https://github.com/nondanee/UnblockNeteaseMusic" target="_blank" rel="noopener">https://github.com/nondanee/UnblockNeteaseMusic</a></p>
<h4 id="1-有一台服务器"><a href="#1-有一台服务器" class="headerlink" title="1.有一台服务器"></a>1.有一台服务器</h4><p>阿里云或者腾讯云或者其他。</p>
<p>选择2或3中的一种教程搭建即可。</p>
<h4 id="2-docker搭建"><a href="#2-docker搭建" class="headerlink" title="2.docker搭建"></a>2.docker搭建</h4><p>在服务器安装docker（这个可以百度一下网上很多类似教程）</p>
<p>docker安装完成后。</p>
<p>直接执行命令完成：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">## 端口位8888可自行替换8888为自己想好要的端口，也可以默认8080</span><br><span class="line"></span><br><span class="line">docker run --name unmusic -d -p 8888:8080 --restart&#x3D;always nondanee&#x2F;unblockneteasemusic</span><br></pre></td></tr></table></figure>
<p>有一点需要注意的：安装后的端口需要在阿里云安全策略中配置这个端口</p>
<h4 id="3-普通安装教程"><a href="#3-普通安装教程" class="headerlink" title="3.普通安装教程"></a>3.普通安装教程</h4><p>Linux下执行命令即可安装</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">curl -o- https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;creationix&#x2F;nvm&#x2F;v0.33.0&#x2F;install.sh | bash</span><br><span class="line">nvm install 10.16.0</span><br><span class="line">git clone https:&#x2F;&#x2F;github.com&#x2F;nondanee&#x2F;UnblockNeteaseMusic.git</span><br><span class="line">cd UnblockNeteaseMusic</span><br><span class="line">npm install pm2 -g</span><br><span class="line">npm install </span><br><span class="line">pm2 start app.js</span><br></pre></td></tr></table></figure>
<p>有一点需要注意的：安装后的端口需要在阿里云安全策略中配置这个端口</p>
<p><strong>直接跳转第三步配置即可。</strong></p>
<hr>
<h2 id="二、Windows搭建教程"><a href="#二、Windows搭建教程" class="headerlink" title="二、Windows搭建教程"></a>二、Windows搭建教程</h2><h4 id="1-下载安装nodejs"><a href="#1-下载安装nodejs" class="headerlink" title="1.下载安装nodejs"></a>1.下载安装nodejs</h4><p>下载安装nodejs （官方地址：<a href="https://nodejs.org/en/）" target="_blank" rel="noopener">https://nodejs.org/en/）</a></p>
<h4 id="2-检查是否安装成功"><a href="#2-检查是否安装成功" class="headerlink" title="2.检查是否安装成功"></a>2.检查是否安装成功</h4><p>Win+R键，输入：cmd</p>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-de5c4eb31eb40601.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200306125658.png"></p>
<p>打开命令行界面</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">## 输入node -v，会显示版本号，有显示就说明成功了</span><br><span class="line">node -v</span><br></pre></td></tr></table></figure>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-6bec409f6f179181.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200306125643.png"></p>
<h4 id="3-下载安装源码"><a href="#3-下载安装源码" class="headerlink" title="3.下载安装源码"></a>3.下载安装源码</h4><p>有Git可以直接：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">## 克隆到指定目录，可以新建一个目录</span><br><span class="line">git clone https:&#x2F;&#x2F;github.com&#x2F;nondanee&#x2F;UnblockNeteaseMusic.git</span><br></pre></td></tr></table></figure>

<p>没有Git可以直接下载zip：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">### 下载到指定目录，随便创建一个</span><br><span class="line">https:&#x2F;&#x2F;github.com&#x2F;nondanee&#x2F;UnblockNeteaseMusic&#x2F;archive&#x2F;master.zip</span><br></pre></td></tr></table></figure>
<p>解压缩到随便一个目录比如：D:\music</p>
<h4 id="4-安装启动"><a href="#4-安装启动" class="headerlink" title="4.安装启动"></a>4.安装启动</h4><p>window系统，鼠标右键点击win图标</p>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-86b31efb4929347e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200306130418.png"></p>
<h6 id="选择命令提示符管理员"><a href="#选择命令提示符管理员" class="headerlink" title="选择命令提示符管理员"></a><strong>选择命令提示符管理员</strong></h6><p><img src="https://upload-images.jianshu.io/upload_images/20815774-0026f4b5b94fc93c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309121419.png"></p>
<p>按照自己的目录结构输入。</p>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-feaf009f6d12f9ed.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200306130840.png"></p>
<p>类比输入以下命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F; 切换到D盘</span><br><span class="line">D:</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F; 切换到nusic文件夹</span><br><span class="line">cd music</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;  切换到UnblockNeteaseMusic-master文件夹（输入cd U 然后按Tab会自动填充目录）</span><br><span class="line">cd UnblockNeteaseMusic-master</span><br></pre></td></tr></table></figure>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-df6c2f9c57ed3c86.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309122710.png"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F; 安装</span><br><span class="line">npm install</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F; 启动</span><br><span class="line">node app.js -p 18080</span><br></pre></td></tr></table></figure>

<p><img src="https://upload-images.jianshu.io/upload_images/20815774-32dea431e9723724.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309122904.png"></p>
<p><strong>弹出提示 HTTP Server running @ <a href="http://0.0.0.0:18080" target="_blank" rel="noopener">http://0.0.0.0:18080</a> 就是启动成功了！！</strong></p>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-72d9914d7d777eaa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309123017.png"></p>
<p>上面的启动关闭CMD命令窗口程序会终止。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F; 输入下面的命令可与保证关闭窗口不会终止程序</span><br><span class="line">npm install -g forever</span><br></pre></td></tr></table></figure>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-d6af43db737f242b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309123155.png"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">forever start app.js -p 18080</span><br></pre></td></tr></table></figure>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-c118a68b50aae418.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309123227.png"></p>
<h2 id="三-配置使用"><a href="#三-配置使用" class="headerlink" title="三.配置使用"></a>三.配置使用</h2><p><img src="https://upload-images.jianshu.io/upload_images/20815774-213889110cebceef.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20200309123547.png"></p>
<p><strong>使用后效果</strong></p>
<p>解锁灰色歌曲<br><img src="https://upload-images.jianshu.io/upload_images/20815774-e2ba6f60e604cdff.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="微信截图_20"></p>
<p><strong>国内外高质量软件分享</strong><br><strong>软件仅用于学习交流，禁止用于商业用途</strong><br><strong>禁止售卖，如有侵权联系删除</strong></p>
<p><strong>关注我的公众号！优质资源立即推送</strong><br><strong>关注我的公众号！优质资源立即推送</strong></p>
<p><img src="https://upload-images.jianshu.io/upload_images/20815774-c690be22d22eb564?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image"></p>

        </div>
    </div>
    
        
    <div class="post__license">
        <p>
            <strong>本文作者：ChrAlpha</strong>
        </p>
        
            <p>
                <strong>
                    <p>文章默认使用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="noopener">CC BY-NC-SA 4.0</a> 协议进行许可，使用时请注意遵守协议。</p>

                </strong>
            </p>
        
        
            <p>
                <strong>
                    本文链接：
                </strong>
                <a href="https://grt1228.gitee.io/2020/03/09/%E6%9C%80%E4%BD%8E%E4%B8%80%E8%A1%8C%E4%BB%A3%E7%A0%81%EF%BC%8C%E8%A7%A3%E9%94%81%E7%BD%91%E6%98%93%E4%BA%91%E7%81%B0%E8%89%B2%E6%AD%8C%E6%9B%B2/">https://grt1228.gitee.io/2020/03/09/%E6%9C%80%E4%BD%8E%E4%B8%80%E8%A1%8C%E4%BB%A3%E7%A0%81%EF%BC%8C%E8%A7%A3%E9%94%81%E7%BD%91%E6%98%93%E4%BA%91%E7%81%B0%E8%89%B2%E6%AD%8C%E6%9B%B2/</a>
            </p>
        
    </div>
 
    
    
        <div class="post-meta post-footer__meta">
    <p>
        最后更新于：2020-03-09
    </p>
</div> 
    
    
        <div class="post-cats post-card__cats">
    
        <a href="/categories/%E6%95%99%E7%A8%8B/" class="post-cats__link button">教程</a>
    
</div>

<div class="post-tags post-card__tags">
    
        <a href="/tags/PC/" class="post-tags__link button"># PC</a>
    
        <a href="/tags/%E5%AE%89%E5%8D%93/" class="post-tags__link button"># 安卓</a>
    
        <a href="/tags/%E8%8B%B9%E6%9E%9C/" class="post-tags__link button"># 苹果</a>
    
        <a href="/tags/%E9%9F%B3%E4%B9%90/" class="post-tags__link button"># 音乐</a>
    
</div> 
     
</div>
<br>

    <div class="post__comment content-box">
        
    <h4 style="margin-top: 0;">Comments</h4>
    
    
        <div id="valine_container" class="valine_thread"></div>
    
    
    
    
    
    


    </div>


</main>
<footer class="footer">
     


    
        
            <!-- Busuanzi UV -->
            <span id="busuanzi_container_site_uv" hidden>
                <span>总访问次数</span>
                <span id="busuanzi_value_site_uv"></span>
                <span>次</span>
                
                    <span>&nbsp;&nbsp;&nbsp;|</span>
                
            </span>
        
        
     
  
    
        
            <p>Copyright © 2020 </p>

        
            <p>Powered by <a href="https://hexo.io" target="_blank" rel="noopener">Hexo</a> | Theme - <a href="https://github.com/ChrAlpha/hexo-theme-cards" target="_blank" rel="noopener">Cards</a></p>

        
    
</footer>

        </div>
        <!-- lazyload -->

    
        <script defer src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@latest/dist/lazyload.min.js"></script>
    
    <script>
        window.lazyLoadOptions = {
            elements_selector: ".lazyload",
            threshold: 0
        };
    </script>


 

 

 
    <!-- Baidu Analytics -->
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement('script');
            hm.src = 'https://hm.baidu.com/hm.js?898993e0d78965b8db33d8dfe2bd8b30';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
 

  

<!-- jQuery -->
 

<!-- fancybox -->
 

<!-- back to top -->
 


    
    
    
        
            
<script src="https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js"></script>

        
        <script>
            var valine_meta = ['nick', 'mail', 'link'],
                guest_info = ''.split(',').filter(function(item){
                    return valine_meta.indexOf(item) > -1
                }),
                guest_required = ''.split(',').filter(function(item){
                    return valine_meta.indexOf(item) > -1
                });
            
            new Valine({
                el: '#valine_container',
                appId: "64xiKzVPrcymB6t8EtU97BtP-gzGzoHsz",
                appKey: "k1NAdfk1ySP2DqQaDOPXMl1d",
                placeholder: "Just go go",
                meta: guest_info,
                requiredFields: guest_required,
                path: "2020/03/09/最低一行代码，解锁网易云灰色歌曲/",
                pageSize: 10,
                avatar: "mm",
                lang: "zh-CN",
                highlight: false,
                recordIP: false,
                
                
                
            });
        </script>
    
    
    
    
    
    
    
    
    

    


    </body>
</html>
